package com.cyy.factory_pattern;

import com.cyy.factory_pattern.abstract_factory.S1;
import com.cyy.factory_pattern.abstract_factory.S2;
import com.cyy.factory_pattern.abstract_factory.person.Nan;
import com.cyy.factory_pattern.abstract_factory.person.Nv;

/**
 * 抽象工厂模式
 */
public class AbstractDemo {
    public static void main(String[] args) {
        System.out.println("---------至阳传承-------------");
        //男铸剑师
        Nan nan = new Nan();
        //造剑
        S1 a1 = nan.abc1("长虹剑");
        S1 d1 = nan.abc1("雨花剑");
        S1 e1 = nan.abc1("青光剑");
        S1 f1 = nan.abc1("奔雷剑");
        S1 g1 = nan.abc1("旋风剑");
        //养鸽子
        S2 a2 = nan.abc2("灵鸽一号");
        S2 d2 = nan.abc2("灵鸽六号");
        S2 e2 = nan.abc2("灵鸽五号");
        S2 f2 = nan.abc2("灵鸽四号");
        S2 g2 = nan.abc2("灵鸽七号");
        a1.show();
        d1.show();
        e1.show();
        f1.show();
        g1.show();
        a2.show();
        d2.show();
        e2.show();
        f2.show();
        g2.show();
        System.out.println("---------至阴传承-------------");
        //女铸剑师
        Nv nv = new Nv();
        S1 b1 = nv.abc1("冰魄剑");
        S1 c1 = nv.abc1("紫云剑");
        b1.show();
        c1.show();
        S2 b2 = nv.abc2("灵鸽二号");
        S2 c2 = nv.abc2("灵鸽三号");
        b2.show();
        c2.show();
    }
}
